﻿using Kernelx.Common.Threading;
using System;
using System.Threading.Tasks;


namespace Demo.ConsoleApp
{
    internal static class Temp
    {
        public static void TestConcurrentContainer()
        {

            var test = new ConcurrentContainer<object>();


            Task.Run(() => {
                test.Set(" is abs");
                Task.Delay(300);
                Console.WriteLine("test:{0}", test.Get());

                Task.Run(() => {

                    Console.WriteLine("subTest:{0}", test.Get());

                });


            });

            Task.Run(() => {

                Task.Delay(100);

                Console.WriteLine("task2-- test:{0}", test.Get());

            });

        }


    }
}
